<template>
  <el-select
    :modelValue="modelValue"
    @update:modelValue="emit('update:modelValue', $event)"
  >
    <el-option
      v-for="channel in ChannelList"
      :key="channel.id"
      :label="channel.cate_name"
      :value="channel.id"
    ></el-option>
    <el-option label="体育" value="199"></el-option>
  </el-select>
</template>

<script setup>
import { artGetChannelService } from '@/api/article.js'
import { ref } from 'vue'

defineProps({
  modelValue: {
    type: [Number, String]
  }
})

const emit = defineEmits(['update:modelValue'])

const ChannelList = ref([])
const getChannelLsit = async () => {
  const res = await artGetChannelService()
  ChannelList.value = res.data.data
  console.log(ChannelList.value)
}
getChannelLsit()
</script>

<style lang="scss" scoped></style>
